package com.chenyuxin.ilp.security.perm.handler;

import com.chenyuxin.ilp.model.enums.exception.UserExceptionEnums;
import lombok.Getter;
import org.springframework.security.core.AuthenticationException;
@Getter
public class RefreshException extends AuthenticationException {
    private final Integer code;
    // 通过枚举来构造异常
    public RefreshException(UserExceptionEnums exceptionEnum) {
        super(exceptionEnum.getErrorMessage()); // 设置 message
        this.code = exceptionEnum.getCode();
    }
}